﻿@using System.Globalization
@using CMSMVC4
@using CMSMVC4.Filters
<!DOCTYPE html>
<html>
<head>
    @*---------------------hotro sell ----------------------*@
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="noodp,index,follow" />
    <meta name="viewport" content="width=device-width" />
    <meta name="description" content="@ViewBag.description"/>
    <meta name="keywords" content="@ViewBag.key" />
    <meta name='revisit-after' content='1 days' />
    <title>@ViewBag.Title</title>
    @{Html.RenderAction("Logosmal","Home");}
    @*----------------------------------------------------*@
    @Styles.Render("~/Content/area")
    @Styles.Render("~/Content/main")
    @Scripts.Render("~/bundles/area")
    <script src="~/Scripts/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="~/Scripts/jquery.unobtrusive-ajax.min.js" type="text/javascript"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
    <script src="~/Scripts/jquery.validate.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="~/Content/nivo-slider/jquery.nivo.slider.pack.js"></script>
    <link rel="stylesheet" href="~/Content/nivo-slider/themes/default/default.css" type="text/css"
        media="screen" />
    <link rel="stylesheet" href="~/Content/nivo-slider/nivo-slider.css" type="text/css"
        media="screen" />
    <link rel="stylesheet" href="~/Content/nivo-slider/style.css" type="text/css" media="screen" />

</head>

<body>
    <div id="main_wapper">
        <div id="main_top">
            <div class="main_top_left">
                <div class="top_left_img">
                    @{Html.RenderAction("LogoBig","Home");}
                </div>
                <div class="top_left_label" style="font-style: italic; display: none;">
                </div>
            </div>
            <div class="main_top_right">
                <div class="right_top" style="font-family: Helvetica,Arial,sans-serif;  font-size: 12px;">
                    <div class="right_top_top">
                        @{Html.RenderAction("LienHeMenu", "Menu");}
                    </div>
                    @{Html.RenderAction("ListMenuLoadParent", "Menu", new { id = ViewBag.Menu });}
                </div>
                <div class="right_bot">
                    <div class="right_bot_right">
                        @{
                            string id = "";
                            if (ViewBag.Model != null)
                            {
                                id = ViewBag.Model.id;
                            }
                        }
                        @{Html.RenderAction("FormSearch", "TimKiem", new { id });}
                    </div>
                    <div class="right_bot_left" style="display: none">
                    </div>
                </div>
            </div>
        </div>
        @RenderBody()
        <div id="main_laguage">
            <a href="@Url.Action("ChangeLanguage", "ChangeLanguage", new { culture = "en-us", returnUrl = Request.Url, area = "Main" })">
                <div id="main_laguage_imgen">
                </div>
            </a><a href="@Url.Action("ChangeLanguage", "ChangeLanguage", new { culture = "vi-vn", returnUrl = Request.Url, area = "Main" })">
                <div id="main_laguage_imgvi">
                </div>
            </a>
        </div>
    </div>
    <div id="main_bot">
        <div class="main_bot_conten" align="center">
            <div style="margin-top: 10px">
                <label style="color: #434144">
                    Copyright © 2012-2013 3DSCAN VIETNAM - All Rights Reserved</label>
            </div>
            <a href="#">
                <div id="main_gettop">
                </div>
            </a>
        </div>
    </div>
    @Scripts.Render("~/bundles/main")
    <script>
        @{
            var db = new CMSMVC4Entities();
            var datas = db.Baners.FirstOrDefault(x => x.Type == BanerStatus.Background && x.Status == CategoriStatus.Thuong);

        }
        $(function () {
            var wfull = $(document).width();
            var hfull = $(document).height();
            if (wfull > 1024) {
                @{if (datas != null)
                  {
                      @:$('body').css({'background-image': 'url("@datas.Name.ToString(CultureInfo.InvariantCulture)")' });
                  }
                }

                $('#main_laguage').css({ 'right': '25px' });
                $('#main_wapper').css({
                    'padding-right': '25px',
                    'padding-left': '25px',
                    '-moz-box-shadow': 'rgba(5, 5, 5, 0.7) 10px 0px 10px, rgba(5, 5, 5, 0.7) -10px 0px 10px',
                    '-webkit-box-shadow': 'rgba(5, 5, 5, 0.7) 10px 0px 10px, rgba(5, 5, 5, 0.7) -10px 0px 10px',
                    'box-shadow': 'rgba(5, 5, 5, 0.7) 10px 0px 10px, rgba(5, 5, 5, 0.7) -10px 0px 10px'
                });
            }
            var wb = $('.right_top_bot').width();
            $('.right_top_top').width(wb);
            var hmid = $('#gioithieu_mid').height();
            var hwap = $('#main_wapper').height();
            var hgt = $('#main_mid').height();
            if (hmid<hfull -430) {
                $('#gioithieu_mid').css({'height': hfull -430});
            }
            if (hfull - hwap>60) {
                $('#main_mid').css({'height':hgt + hfull - hwap - 60});
            }
        });
    </script>
    <script type="text/javascript">
        $(function () {
            $('#slider').nivoSlider();
        });
    </script>
    @RenderSection("scripts", required: false)
</body>
</html>
